<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    <meta name="copyright" content=
    "Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css" />
    <title>
      Inclusion and Exclusion Patterns
    </title>
  </head>

  <body>
    <h1>
      Inclusion and Exclusion Patterns
    </h1>
    <p>
      Inclusion and Exclusion patterns can be configured for source folders. They define which
      files are considered by the Java builder and other Java tooling. This set of files consists
      of all files and folders where the path relative to the source folder matches an inclusion
      pattern but not an exclusion pattern.
    </p>
    <p>
      By default, all files and folders contained in a source folder are included. By defining an
      inclusion pattern, the set of included resources will be limited to the resources matching
      the inclusion pattern. Using exclusion patterns, some of these resources can be excluded
      again.
    </p>

    <p>
      Exclusion patterns are required when nesting source folders. The nested folder must be
      excluded from the outer source folder.
    </p>
    <p>
      The patterns have the same format as <a href=
      "http://ant.apache.org/manual/dirtasks.html#patterns">ANT patterns</a>:
    </p>
    <ul>
      <li>'*' matches zero or more characters, '?' matches one character.
      </li>

      <li>'/' is used to separate folders: This means the first segment in the pattern is matched
      against the most outer folder name in the path to match, the second segment with the second,
      and so on.
      </li>
      <li>'**' matches any number of folders
      </li>
    </ul>
    <h3 class="related">Related concepts</h3>
      <a href="concept-java-builder.htm">Java builder</a><br />

      <a href="concept-classpath-variables.htm">Classpath variables</a><br />
      <a href="concept-access-rules.htm">Access rules</a>
      <h3 class="related">Related references</h3>
      <a href="../reference/ref-properties-build-path.htm">Java Build Path properties</a><br />
  </body>
</html>
